<template>
  <div id="suggest">
    <md-field title="提议类别：" class="radio-field">
      <md-radio-list v-model="suggestWay" :options="ways" icon-size="lg" />
    </md-field>
    
    <div class="tip">
      <md-notice-bar mode="link" type="activity" icon="info-solid">业主大会议事规则</md-notice-bar>
    </div>
    <div class="tip">
      <md-notice-bar mode="link" type="activity" icon="info-solid">管理规约</md-notice-bar>
    </div>
    <div class="tip">
      <md-notice-bar mode="link" type="activity" icon="info-solid">业委会章程</md-notice-bar>
    </div>
    <div class="next-btn">
      <md-button type="primary" size="small" round @click="navSendSuggest">下一步</md-button>
    </div>
    <p class="tip-text" >您以业主身份，发起业主大会表决提议，提议生成后，只有自己可见，您需要将该提议分享链接给小区其他业主，其他业主点击进入后，才能看到您的提议，并进行表决。只有小区20%以上业主对您的提议投了赞成票，您的提议才算通过！通过后，所有业委会委员、监事会委员，街道民政管理员，会收到该提议已通过的微信通知，此时业委会需要按提议内容，发起正式业主大会表决投票，如果业委会延迟没有按时发起，由街道民政督导其执行发起组织业主大会表决投票。</p>
  </div>
</template>

<script>
import { Field, RadioList, NoticeBar, Button,Toast } from "mand-mobile";
import https from "@/https";
import config from "@/config";
export default {
  components: {
    [Field.name]: Field,
    [RadioList.name]: RadioList,
    [NoticeBar.name]: NoticeBar,
    [Button.name]: Button
  },
  name: "suggest",
  data() {
    return {
      suggestWay: 2,
      ways: [
        // {
        //   value: 1,
        //   text: "向业主委员会发提议",
        //   brief:
        //     "提议的内容，将发送给业主委员会表决，如果过半的业委会委员支持您的提议，就可生效。"
        // },
        {
          value: 2,
          text: "由业主发起业主大会表决提议",
          
        }
      ]
    };
  },
  methods: {
    navSendSuggest() {
      let qid = this.$store.state.residentialType.qid;
      let uid = this.$store.state.userInfo.id;
      let is_xz  = this.suggestWay;
      let params = {
        qid,
        uid,
        is_xz
      };
      https
        .fetchPost(config.XzfaBu, params)
        .then(res => {
          if(res.data.code == 1){
            this.$router.push({
              path: "/sendSuggest",
              query: { is_xz : is_xz }
            });
          }else {
             Toast.failed(res.data.msg);
          }
        })
        .catch(err => {
          console.log(err);
        });
    }
  },
  created() {}
};
</script>

<style  lang="scss" scoped>
$themeColor: #444444;
$themeGold: #d7b987;
#suggest {
  .tip {
    padding: 15px 36px;
  }
  .next-btn {
    margin-top: 60px;
    padding: 30px 220px;
  }
  .tip-text {
    padding: 0 30px;
    color: #858b9c;
    font-size: 28px;
    line-height: 44px;
    margin-top: 40px;
    text-indent: 2em;
  }
}
</style>
